package com.shareinfo.permission.service.impl;

import java.util.List;
import javax.annotation.Resource;
import net.sf.json.JSONArray;
import org.springframework.stereotype.Service;
import com.shareinfo.framework.pagination.Page;
import com.shareinfo.permission.dao.IUserDeptDao;
import com.shareinfo.permission.model.UserDept;
import com.shareinfo.permission.query.UserDeptQuery;
import com.shareinfo.permission.service.IUserDeptService;

@Service("userDeptService")
public class UserDeptService implements IUserDeptService
{
	@Resource
	private IUserDeptDao userDeptDao;

	public List<UserDept> selectList(UserDeptQuery query, Page page)
	{
		return userDeptDao.selectList(query, page);
	}

	public Integer selectCount(UserDeptQuery query)
	{
		return userDeptDao.selectCount(query);
	}

	public Integer selectChildCount(List<String> list)
	{
		return userDeptDao.selectChildCount(list);
	}

	public JSONArray selectTreeList(UserDeptQuery query)
	{
		return userDeptDao.selectTreeList(query);
	}

	public UserDept selectOne(UserDeptQuery query)
	{
		return userDeptDao.selectOne(query);
	}

	public void insert(UserDept userDept)
	{
		userDeptDao.insert(userDept);
	}

	public void update(UserDept userDept)
	{
		userDeptDao.update(userDept);
	}

	public void delete(List<UserDept> list)
	{
		userDeptDao.delete(list);
	}
}